<table id="archives" class="generic_datatable table table-striped table-bordered" >
  <caption>
    <h3 class="data-table-title"><%= @page_title %></h3>
  </caption>
  <thead>
    <tr>
      <th>Title</th>
      <th>Location</th>
      <th>Start time</th>
      <th>End time</th>
      <th>Duration</th>
      <th>Status</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @archives.each do |e| %>
      <tr class='<%= column_color_class(e) %>'>
        <td><%= link_to e.title, e %></td>
        <td><%= e.location %></td>
        <td data-order='<%= e.start_time %>'><time>
          <%= e.start_time.strftime('%a, %b %d, %y %k:%M') if e.start_time  %>
        </time></td>
        <td data-order='<%= e.end_time %>'><time>
          <%= e.end_time.strftime('%a, %b %d, %y %k:%M') if e.end_time  %>
        </time></td>
        <td><%= e.duration %></td>
        <td><%= e.status %></td>
        <td><%= table_button_link 'Edit', edit_event_path(e) unless cannot? :update, e %></td>
      </tr>
    <% end %>
  </tbody>
</table>
